package de.jmda.core.util.xl;

import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.util.List;

import org.junit.Test;

import com.google.common.collect.ArrayTable;

import de.jmda.core.util.xl.AbstractWorkbookReader;
import de.jmda.core.util.xl.StringTableReader;
import de.jmda.core.util.xl.WorkbookReader;

public class JUTStringTableReader
{
	@Test
	public void test() throws IOException
	{
		WorkbookReader<String> reader = new StringTableReader("doc/test.xlsx");

		List<ArrayTable<Integer, Integer, String>> tables = reader.getSheets();

		assertEquals("number of tables:", 3, tables.size());

		System.out.println("tab1\n" + AbstractWorkbookReader.dump(tables.get(0)));
		System.out.println("tab2\n" + AbstractWorkbookReader.dump(tables.get(1)));
		System.out.println("tab3\n" + AbstractWorkbookReader.dump(tables.get(2)));
	}
}